package com.homework.ch02;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

public class OuterClass {
    public int data1;
    public int data2;
    public static int data3=0;
    public static int data6=2;

    public void test(){
        System.out.println("out::test方法");
        InnerClass inner=new InnerClass();

    }
    {
        System.out.println("外部类的构造代码块");
    }
    static{
        System.out.println("静态外部类的构造代码块");
    }
    //静态内部类
    /*abstract */static class InnerClass {
        public int data1=10;
        public int data3=1;
        public int data4=3;
        public static int a=1;
        public static int data6=7;
        {
            System.out.println("内部类的构造代码块");
        }
        static{
            a=20;
            System.out.println(a);
            System.out.println("静态内部类的构造代码块");
        }
        public void test(){
            System.out.println("inner::test方法");
            System.out.println(data3);
            System.out.println(OuterClass.data6);
            System.out.println(data1);
            OuterClass out=new OuterClass();
            System.out.println(out.data1);
            System.out.println(out.data2);

        }
    }

}
